<template>
    <div class="workspace">
        <workspace-header @listenSwitchCate="getSwirchCate"></workspace-header>
        <todo-list :todoRequestURL="todoRequestURL"  v-show="switchCate == 'todo'"></todo-list>
        <toread-list :toreadRequestURL="toreadRequestURL" v-show="switchCate == 'toread'"></toread-list>
        <processed-list :processedRequestURL="processedRequestURL" v-show="switchCate == 'processed'"></processed-list>
        <replied-list :repliedRequestURL="repliedRequestURL" v-show="switchCate == 'replied'"></replied-list>
    </div>
</template>

<script>
import WorkspaceHeader from './components/Header.vue'
import TodoList from './components/todo-list.vue'
import ToreadList from './components/toread-list.vue'
import ProcessedList from './components/processed-list.vue'
import RepliedList from './components/replied-list.vue'
export default {
    name: "WorkSpace",
    data: function(){
        return {
            switchCate: 'todo',
            todoRequestURL: 'api/_api/http/172.20.55.111/app55/api/flow-mobile/v1/user-tasks/todo',
            toreadRequestURL: 'api/_api/http/172.20.55.111/app55/api/flow-mobile/v1/user-tasks/inform',
            processedRequestURL: 'api/_api/http/172.20.55.111/app55/api/flow-mobile/v1/user-tasks/processed',
            repliedRequestURL: 'api/_api/http/172.20.55.111/app55/api/flow-mobile/v1/user-tasks/replied-inform',
        }
    },
    components: {
        WorkspaceHeader,
        TodoList,
        ToreadList,
        ProcessedList,
        RepliedList
    },
    methods: {
        getSwirchCate: function(cate){
            this.switchCate = cate
        }
    }
};
</script>
<style scoped>

</style>